home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 47
/
047.d81
/
mathers of unive
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
8KB
|
214 lines
5 ifa=.thena=1:load"mathers.spr",8,1
10 poke53248+21,.
15 poke55,.:poke56,48:clr
20 gosub30:print"[147]":pokev,6:pokevb,6:goto50
30 o$=" ":t$=" ":l$=" ":p$=l$+" "
35 j$=p$+" ":q$=j$+" ":s$=q$+" "
40 v=53280:vb=v+1:k=1024:s=54272:c$="correct"
45 i$="incorrect":d$="":return
50 j=j+1:x=int(rnd(1)*999)+k:p=x+s:pokex,46:pokep,1:ifj<100then50
60 poke1149,81:poke1577,81:poke1692,81:poke55421,8:poke55849,5:poke55964,2
70 printd$"[152] [155] [223][169] [146][152][223][155] [146][152][223][155] [146][152][223][155] ";
75 print"[146][152][223] [155] [146][152][223][155] [146][152][223][155] [146][152][223]";
80 print"[155] [146][152][223]"
90 print" [155] [146][223] [146][169] [146] [146] [146] [146] ";
95 print" [146] [146] [146] [146] [146] [146] [152][167]"
100 print" [155] [146] [223][169] [146] [146] [152] [155] [146] [152] [155] [146] [146] [146][169] [152][146][167]"
110 print" [155] [146] [152][169][155] [146] [146] [146] [152] [155] [146] ";
115 print"[152] [155] [146] [146] [146] [146] [223][223][146] [152][146][167]"
120 print" [155] [146] [152][223] [155] [146] [146] [146] [152] [155] [146] [152] ";
125 print"[155] [146] [146] [146] [146] [146] [152][146][167]"
130 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][155]"
140 print"[155]"s$"[157]o f t h e"
150 print" [146] [146] [223] [146] [146] [223][223][169][146][169] [192][192][146] [192] [146] [192][192][146] [192][192][146]"
160 print" [146] [146][223] [146] [146] [223][169] [192][192][146] [146] [188][146] [192][192] [146] [192][192][146]":poke198,.
170 x=int(rnd(1)*990)+k:z=peek(x):ifz<>32orx>1263andx<1464then170
175 geta$:ifa$<>""then200
180 j=x+s:pokex,46:pokej,1:forp=1to50:next
185 pokej,6:pokex,32:forp=1to100:next
190 ifm<30thenm=m+1:goto170
200 pokev,0:pokevb,0:print"[147] t r a i n i n g m i s s i o n xxvii"
210 print"you are about to undergo a trial run in"
220 print"the space pilot training program. your"
230 print"mission is to make a successful landing"
240 print"on a nearby asteroid.to do this you must"
250 print"accurately calculate the correct pounds"
260 print"of fuel needed to fire the main rockets."
270 print"if your calculations are inaccurate, the"
280 print"rockets will not fire, fuel will be lost"
290 print"and gravity will pull on the ship (spend"
300 print"all your fuel and your ship will crash"
310 print"on the launching platform)....good luck!"
320 printj$"press any key to begin";
330 getf$:iff$=""then330
340 print"[147]":gosub30:j=24:jj=226:m=247
345 dimhf(18),hh(18),lf(18),ll(18),dr(18)
350 fori=1to18:readhf(i),hh(i),lf(i),ll(i),dr(i):next
355 fori=1to4:readqc(i):next
360 fori=1to7:readrd(i),rp(i),rr(i),rn(i):next:pl=-1:kf=183
370 print"[147]"," pick a level!",," level"l$;
375 print" most difficult problem"
380 print"1) beginner i"q$" 5*5",,"2) beginner ii"q$" 9*5"
390 print"3) beginner iii"q$"9*9",,"4) junior i"s$"40*9"
400 print"5) junior ii"s$"[157]100*9","6) advanced"s$"100*99"
410 print"7) senior"s$" 1000*999",
415 print"8) to change and set the second number"
416 print"9) exit"
430 print" multiply numbers for highest dividend";:poke198,0
440 getb$:a=val(b$):ifa<1ora>9then440
445 ifa=9then60000
450 h=7:ifa=8then1200
460 print"[147]"d$j$"select a category!":print,"1) addition"
470 print,"2) subtraction":print,"3) multiplication"
475 print,"4) division"
480 print,"5) combination 1 & 2":print,"6) combination 3 & 4":poke198,0
490 geta$:b=val(a$):ifb<1orb>6then490
500 gosub1750:x=(rnd(1)*ti):ifa>6orpl>99thenh=6
510 print"[147]":pokev,7:g=53265:pokeg,peek(g)and239:ifb=5orb=6thenco=b-3
520 x=int(rnd(1)*986)+1037:ifx>1183andx<1224then520
530 ifx>1263andx<1304then520
540 p=x+s:z=z+1:pokex,46:pokep,1:ifz<61then520
550 print:printd$d$d$d$d$" e"j$"fuel"j$"[157]f":ifb=4thenrt=1
560 print" [146] . [152][164][175][185][185][185][175][164]";
570 vc=13*4096:pokevc+21,49:pokevc+29,112:poke2040,192:poke2041,193
580 poke2042,194:poke2043,195:poke2044,196:poke2045,197:poke2046,198
590 pokevc+16,95:pokevc+0,j:pokevc+1,jj:pokevc+2,j:pokevc+3,m:pokevc+4,j
600 pokevc+5,m:pokevc+6,j:pokevc+7,m:pokevc+8,12:pokevc+9,50:pokevc+10,kf
610 pokevc+11,244:pokevc+12,12:pokevc+13,227:pokevc+39,11:pokevc+40,7
620 pokevc+41,2:pokevc+42,2:pokevc+43,3:pokevc+44,0:pokevc+45,11:pokev,5
630 pokev,0:pokevb,0
640 gosub1690:pokeg,peek(g)or16
650 y=-1:y$="":x=0:xx=0:t=t+1:ifcothengosub1080
660 gosub960:gosub1690:print"[151]enter answer-":print"press return":print
670 ifpl>-1thenxx=pl
680 ifrt>0orco=4then1090
690 gosub790:f=x:gosub710:gosub720:printt$" "x:f=xx:gosub710:gosub720
700 gosub750:gosub710:printspc(h)"[192][192][192][192]":gosub710
705 f=n:gosub720:gosub970:goto810
710 print:print"[145]";:return
720 printt$;:iff<10thenprinto$;
730 nx=99:fori=1to4:iff>nxthenprint"[157]";:nx=nx*10+9
740 next:return
750 printt$;:ifb=1thenprint"+"xx:n=x+xx
760 ifb=2thenprint"-"xx:n=x-xx
770 ifb=3thenprint"x"xx:n=x*xx
780 return
790 ifxx>xthenzx=x:x=xx:xx=zx
800 return
810 kf=kf-4:ifkf<9thenkf=9
820 pokevc+10,kf:ify<>nthenwr=wr+1:goto920
830 print""c$"!":ri=ri+1:jj=jj-7:m=jj+21:pokes+3,1:pokes+6,249
840 pokes+1,6:pokes+4,129:pokevc+21,57
850 tp=tp+1:forp=1to55:next:pokevc+21,61:iftp=11then880
860 forp=1to55:next:pokevc+21,59:iftp=13then890
870 goto850
880 pokevc+1,jj:pokevc+3,m:pokevc+5,m:pokevc+7,m:goto850
890 pokes+4,0:pokevc+21,49
895 ifjj<41thengosub1690:gosub1040:print"[158]":goto1650
900 ifkf=9then1580
910 tp=0:forp=1to500:next:goto650
920 print"sorry....":print"the total is":print"[156]"spc(8)n
925 ifkf=9then1580
930 if(ri>.)thenjj=jj+10:m=jj+21:ifjj>225thenjj=226:goto1620
940 pokevc+1,jj:pokevc+3,m:pokevc+5,m:pokevc+7,m:gosub1660
945 forp=1to10:pokes,lf
950 pokes+1,hf:pokes+4,33:lf=lf-1:hf=hf-1:next
955 pokes+4,0:forp=1toz:next:goto910
960 x=int(rnd(1)*rd(a))+rp(a):xx=int(rnd(1)*rr(a))+rn(a):return
970 y$="":poke198,0:ifa=8thenprint"? ";:goto990
980 printt$"? [144]";
990 wait198,15:getz$:z=asc(z$):ifz>47andz<59theny$=y$+z$:print""z$;
1000 zl=len(y$):ifzl>6thenz=20:goto1020
1010 ifz=13andzltheny=val(y$):printo$:return
1020 ifz=20andzltheny$=left$(y$,zl-1):print"[144][157] [146][157]";
1030 goto990
1040 ift<2then1070
1050 printt$"[152]out of":print""t"[152]problems":printt$"you had"
1060 print""ri"[152]"c$" and":print""wr"[152]"i$:printt$"answers!":return
1070 printd$"[152]you never got",,,"off the ground!",,,"what happened??"
1075 return
1080 i=co:co=qc(i):b=qc(i):return
1090 ifxx=0thenxx=int(rnd(1)*5)+1
1100 f=xx:print"":gosub1130:iff>9thenprinto$;:iff>99thenprinto$;
1110 printt$"[213][192][192][192][192][192][192][192]":gosub1130:f=x*xx:printxx"[221]"f:print:print"[157][157][145][145][145][145]"
1120 gosub1160:printt$;:gosub970:n=x:print"":goto810
1130 print" ";:iff<10thenprinto$;
1140 iff>99thenprint"[157]";:iff>999thenprint"[157]";
1150 return
1160 iff<10thenreturn
1170 xy=len(str$(f)):l=len(str$(x)):ifxy=lthenreturn
1180 fori=1to3:ifl+(i)<=xythenprinto$;
1190 next:return
1200 print"[147] enter the number (from 0 to 999) which",t$
1205 print"you wish to ";
1210 print"appear in the problems",
1215 print" a zero in problems of division will"
1220 print" produce a random number from 1 to 5",s$"[157][151]press return"
1230 print"number";:gosub970:pl=y:ifpl<0orpl>999then1200
1240 printl$" you have selected number"pl:forp=1to2000:next:goto370
1250 pokevc+21,0:pokeg,peek(g)and239:print"[147]"ri;c$s$" "wr;i$
1260 ifa<7andb<3orb=5then1340
1270 printd$l$" you have met the requirements"
1280 printq$"to qualify you as"
1290 ifzs=1thenprint" a kite flyer!! you need more training.":goto1330
1300 ift<30thenprint" a topnotch pilot! congratulations!!"
1310 ift>29andt<38thenprint" a good pilot with high potential."
1320 ift>37thenprintp$"a co-pilot. keep trying!!"
1330 print"":go